home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / HYPERCAR / BUTTONS_ / WHOOSHBU.TTO / card_2897.txt < prev    next >
Text File  |  1990-04-01  |  5KB  |  180 lines

  1. -- card: 2897 from stack: in.TTO
  2. -- bmap block id: 4639
  3. -- flags: 0000
  4. -- background id: 2607
  5. -- name: Homer
  6. ----- HyperTalk script -----
  7. on idle
  8.   -- hide button "DONE!"
  9. end idle
  10.  
  11.  
  12. -- part 1 (button)
  13. -- low flags: 00
  14. -- high flags: A002
  15. -- rect: left=23 top=165 right=188 bottom=131
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 0 / 0
  18. -- text alignment: 1
  19. -- font id: 0
  20. -- text size: 12
  21. -- style flags: 0
  22. -- line height: 16
  23. -- part name: WHOOSH
  24. ----- HyperTalk script -----
  25. on mouseUp
  26.   set lockscreen to true
  27.   set the cursor to 4
  28.   choose button tool
  29.   get the location of button "WhooshButton"
  30.   click at it
  31.   doMenu "Copy Button"
  32.   choose browse tool
  33.   go to home
  34.   doMenu "Paste Button"
  35.   choose browse tool
  36.   go to card "Homer" in stack "WhooshButton" -- your changes go here
  37.   set lockscreen to false
  38.   hide button "cover"
  39.   set hilite of button "DONE!" to true
  40.   wait 20 ticks
  41.   set hilite of button "DONE!" to false
  42.   wait 20 ticks
  43.   set hilite of button "DONE!" to true
  44.   wait 20 ticks
  45.   set hilite of button "DONE!" to false
  46.   wait 20 ticks
  47.   set hilite of button "DONE!" to true
  48.   wait 20 ticks
  49.   show button "cover"
  50. end mouseUp
  51.  
  52.  
  53. -- part 6 (button)
  54. -- low flags: 00
  55. -- high flags: A003
  56. -- rect: left=138 top=169 right=198 bottom=251
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 0 / 0
  59. -- text alignment: 1
  60. -- font id: 0
  61. -- text size: 12
  62. -- style flags: 0
  63. -- line height: 16
  64. -- part name: WhooshButton
  65. ----- HyperTalk script -----
  66. on mouseUp
  67.   visual dissolve
  68.   go to stack "WhooshButton" -- your stack name goes here
  69. end mouseUp
  70.  
  71.  
  72. -- part 2 (field)
  73. -- low flags: 01
  74. -- high flags: 0007
  75. -- rect: left=135 top=165 right=312 bottom=478
  76. -- title width / last selected line: 0
  77. -- icon id / first selected line: 0 / 0
  78. -- text alignment: 0
  79. -- font id: 3
  80. -- text size: 14
  81. -- style flags: 0
  82. -- line height: 18
  83. -- part name: 
  84.  
  85.  
  86. -- part 3 (button)
  87. -- low flags: 00
  88. -- high flags: 2000
  89. -- rect: left=23 top=273 right=312 bottom=131
  90. -- title width / last selected line: 0
  91. -- icon id / first selected line: 0 / 0
  92. -- text alignment: 1
  93. -- font id: 0
  94. -- text size: 12
  95. -- style flags: 0
  96. -- line height: 16
  97. -- part name: 
  98. ----- HyperTalk script -----
  99. on mouseUp
  100.   visual effect dissolve
  101.   go to next card
  102. end mouseUp
  103.  
  104.  
  105. -- part 4 (button)
  106. -- low flags: 00
  107. -- high flags: A002
  108. -- rect: left=23 top=246 right=269 bottom=131
  109. -- title width / last selected line: 0
  110. -- icon id / first selected line: 0 / 0
  111. -- text alignment: 1
  112. -- font id: 0
  113. -- text size: 12
  114. -- style flags: 0
  115. -- line height: 16
  116. -- part name: See the Script
  117. ----- HyperTalk script -----
  118. on mouseUp
  119.   edit script of button "WHOOSH"
  120. end mouseUp
  121.  
  122.  
  123. -- part 5 (button)
  124. -- low flags: 00
  125. -- high flags: 2000
  126. -- rect: left=444 top=128 right=166 bottom=485
  127. -- title width / last selected line: 0
  128. -- icon id / first selected line: 20098 / 20098
  129. -- text alignment: 1
  130. -- font id: 0
  131. -- text size: 12
  132. -- style flags: 0
  133. -- line height: 16
  134. -- part name: Home
  135. ----- HyperTalk script -----
  136. on mouseUp
  137.   visual effect iris close
  138.   go home
  139. end mouseUp
  140.  
  141.  
  142. -- part 10 (button)
  143. -- low flags: 00
  144. -- high flags: E002
  145. -- rect: left=23 top=192 right=242 bottom=130
  146. -- title width / last selected line: 0
  147. -- icon id / first selected line: 0 / 0
  148. -- text alignment: 1
  149. -- font id: 0
  150. -- text size: 12
  151. -- style flags: 0
  152. -- line height: 16
  153. -- part name: DONE!
  154.  
  155.  
  156. -- part 9 (button)
  157. -- low flags: 00
  158. -- high flags: 0001
  159. -- rect: left=22 top=191 right=243 bottom=132
  160. -- title width / last selected line: 0
  161. -- icon id / first selected line: 0 / 0
  162. -- text alignment: 1
  163. -- font id: 0
  164. -- text size: 12
  165. -- style flags: 0
  166. -- line height: 16
  167. -- part name: cover
  168.  
  169.  
  170. -- part contents for card part 2
  171. ----- text -----
  172. AUTOMATES OPERATION OF PLACING A BUTTON ON THE HOME CARD  POINTING TO THE CURRENT STACK.
  173. ----------------------------------------
  174. To use it: The easiest way to use WhooshButton is to copy this entire card into your own stack. Then you can customize the screen, button names and sizes etc., to fit your stack. You will need to change card and stack names in the "go to card" line of the "WHOOSH" button script. You'll also need to rename the stack to load in the WhooshButton button script (the WhooshButton itself is hidden behind this field).      
  175.  
  176. If you wish to to totally customize your button whooshing, you may alternatively copy only the button "WHOOSH" into your stack, and design the rest yourself. Note that on this card a blank opaque button hides the "done" alert button until the whoosh operation is completed. Needless to say, there are many different ways to accomplish this--the method used here is only one. 
  177.  
  178. Here at the Acme Dot Company, sharing stackware tools gives us a lot of pleasure. Hope to see home buttons whooshing in your stacks soon.
  179.  
  180. -- John